//////////////////////////////////////////////////////////////////////////////
//
//  Created by Philip Mulcahy on 02/03/2013.
//  Copyright (c) 2013 Philip Mulcahy. All rights reserved.
//
//  This file is part of the note-recog library.
//
//  note-recog is free software: you can redistribute it and/or modify
//  it under the terms of version 3 of the GNU Lesser General Public License 
//  as published by the Free Software Foundation.
//
//  note-recog is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with note-recog. If not, see <http://www.gnu.org/licenses/>.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef note_recog_FrameFromTimeDomainGenerator_h
#define note_recog_FrameFromTimeDomainGenerator_h


#include "IIterable.h"
#include <utility>
#include <vector>

class IFrameGenParamGen;

class TimeDomainGenerator 
: public IIterable<std::pair<float, std::vector<short> > >
{
public:
    TimeDomainGenerator(IFrameGenParamGen&,
                       float samplingFreq,
                       float frameSize);
    virtual ~TimeDomainGenerator();
    virtual std::pair<float, std::vector<short> > next();
    virtual bool hasNext() const;
private:
    size_t _sequenceNumber;
    const float _frameInterval;
    const float _samplingFreq;
    const float _sampleInterval;
    const size_t _frameSize;
    IFrameGenParamGen& _gen;
    float timeStamp() const;
    TimeDomainGenerator(); // not implemented
    TimeDomainGenerator(const TimeDomainGenerator&); // not implemented
    TimeDomainGenerator operator=(const TimeDomainGenerator&); // not implemented
};


#endif
